<template>
<div>
  <NavBar>
 <div slot="left" class="left" @click="return_before"><van-icon name="arrow-left" /></div>
    <div slot="center" v-if="Typelist[$route.params.ordering]">{{Typelist[$route.params.ordering].typename}}</div>
  </NavBar>
  <Article_TypeItem></Article_TypeItem>
</div>
</template>

<script>
import NavBar from "@/components/common/NavBar/NavBar";
import {getType} from "@/network/Users/Type";
import Article_TypeItem from "@/views/Article/Article_TypeItem";
export default {
name: "ArticleList",
  components:{NavBar,Article_TypeItem},
  data(){
  return{
    Typelist:[]
  }
  },
  methods:{
  return_before(){
    history.go(-1)
  }
  },
  created() {
    getType().then(
      res=>{
        console.log(this.$route.params.ordering);
        this.Typelist=res.type
      }
  )
  }
}
</script>

<style scoped>

</style>